//2009/08/18 16:42:08
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class CrossWordPuzzle
{
public:
    int countWords(vector <string> board, int size)
    {
        int ret = 0;
        for (int i=0; i<board.size(); i++)
        {
            string s = board[i];
            s = 'X' + s + 'X';
            int inc = 0;
            for (int i=0; i<s.size(); i++)
            {
                if (s[i] == '.')
                {
                    inc ++;
                }
                else
                {
                    if (inc == size) ret ++;
                    inc = 0;
                }
            }
        }
        return ret;
    }
};
